package com.jsmile.cloud.tradecenter.settle.filter;

import java.util.List;

import com.jsmile.cloud.tradecenter.settle.filter.context.SettlementContext;

import lombok.Setter;

public abstract class AbstractSettlementFilter implements SettlementFilter {

    protected SettlementContext context;
    // 结算过滤器链条
    @Setter
    private List<AbstractSettlementFilter> settleFilters;

    @Override
    public boolean isSatisfied() {
        return true;
    }

    /**
     * 保存结算数据
     */
    @Override
    public void settlement() {
        // 执行所有规则链条
        SettlementFilterChain filterChain = new SettlementFilterChain();
        filterChain.addFilters(settleFilters).settlement();
    }

}
